html_format(name(Value,N), Field, input(text, [name=Field, size=N, value=Value]), unidimensional, public) .

html_format(name(Value,_N), Field, tt(Value), unidimensional, private) .

html_format(textinput(Value, Rows, Cols), Field, textinput(Field, [rows=Rows, cols=Cols], Value), bidimensional, public) .

html_format(textinput(Value, _Rows, _Cols), Field, tt(Value), bidimensional, private) .

html_format(number(Value,N), Field, input(number, [name=Field, size=N, value=Value]), unidimensional, public) .

html_format(number(Value,_N), Field, tt(Value), unidimensional, private) .

html_format(password(Value ,N), Field, input(password, [name=Field, size=N, value=Value]), unidimensional, public) .

html_format(password(Value ,_N), Field, tt('forbidden'), unidimensional, private) .

html_format(checkbox(State), Field, checkbox(Field, State), plain, _) .

html_format(menu(Size, Att, Fields), Field, menu(Field, [size=Size, Att], Fields), plain, _) .

html_format(input_img(Value, N), Field, [input(text, [name=Field, size=N, value=Value]),\\, img$[src=Value]], unidimensional, public) .

html_format(input_img(Value, _N), Field, img$[src=Value], unidimensional, private) .

html_format(input_link(Value, N), Field, [input(text, [name=Field, size=N, value=Value]),\\, ref(Value, Value)], unidimensional, public) .

html_format(input_link(Value, _N), Field, ref(Value, Value), unidimensional, private) .

html_format(invisible(Value,N), Field, input(hidden, [name=Field, size=N, value=Value]), unidimensional, public) .

html_format(invisible(Value,_N), Field, tt(Value), unidimensional, private) .

html_format(name_ck(Value,N,_), Field, input(text, [name=Field, size=N, value=Value]), unidimensional, public) .

html_format(name_ck(Value, N, State), Field, [input(text, [name=Field, size=N, value=Value]), checkbox(Field_ck, State)], unidimensional, private) :- !, atom_concat(Field, '_ck', Field_ck).

html_format(number_ck(Value,N,_), Field, input(number, [name=Field, size=N, value=Value]), unidimensional, public).

html_format(number_ck(Value, N, State), Field, [input(number, [name=Field, size=N, value=Value]), checkbox(Field_ck, State)], unidimensional, private) :- atom_concat(Field, '_ck', Field_ck).

html_format(input_link_ck(Value, N, State), Field, [input(text, [name=Field, size=N, value=Value]),\\, ref(Value, Value)], unidimensional, public) .

html_format(input_link_ck(Value, N, State), Field, [input(text, [name=Field, size=N, value=Value]), checkbox(Field_ck, State),\\, ref(Value, Value)], unidimensional, private) :- !, atom_concat(Field, '_ck', Field_ck).

html_format(color(Value), Field, % Value in [red,blue,green]
            [radio(Field,red,Value), image('/gifs/mana.red.gif'),\\,
             radio(Field,blue,Value), image('/gifs/mana.blue.gif'),\\,
             radio(Field,green,Value), image('/gifs/mana.green.gif')],plain,_) .




